package cn.ad.model;

import cn.ad.enumration.AdFormat;
import org.apache.ibatis.type.Alias;

/**
 * 默认创意信息Model
 * @author helong.zhao
 * @date 2016-07-13
 */
@Alias("creativeDefaultModel")
public class CreativeDefaultModel {

    /**
     * 创意ID
     */
    private int id;

    /**
     * 创意名称
     */
    private String name;

    /**
     * 广告形式ID
     */
    private int formatId;

    /**
     * 广告形式名称
     */
    private String formatName;

    /**
     * 目标/下载地址
     */
    private String targetURL;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getFormatId() {
        return formatId;
    }

    public void setFormatId(int formatId) {
        this.formatId = formatId;
    }

    public String getFormatName() {
        return AdFormat.forValue(formatId);
    }

    public void setFormatName(String formatName) {
        this.formatName = formatName;
    }

    public String getTargetURL() {
        return targetURL;
    }

    public void setTargetURL(String targetURL) {
        this.targetURL = targetURL;
    }

    @Override
    public String toString() {
        return "creative{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", formatId=" + formatId +
                ", formatName='" + getFormatName() + '\'' +
                ", targetURL='" + targetURL + '\'' +
                '}';
    }
}
